local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script, script.Parent.Bow);
-- 装备到玩家身上的弓箭
local Tool=_G.CommonOHOH.load.WeaponTool();

local IsClient = game:GetService("RunService"):IsClient();

local BaseComponent=script.Parent.Component
local ShootComponent=script.Parent.Component.shoot

function M.new(self, ...)
	return M(self, ...);
end;

function M.ctor(self,equiId,character,player)
    if  IsClient then
        M.super.ctor(self,equiId,character,nil,player);
        self:AddPrivateComponent(BaseComponent.animation)
        self:AddPrivateComponent(BaseComponent.input)
        self:AddPrivateComponent(BaseComponent.audio)
        self:AddPrivateComponent(ShootComponent.shoot)
        self:AddPrivateComponent(script.syn2Server)

    else
        local weaponInfo=Tool.GetWeaponArt(equiId)
        M.super.ctor(self,equiId,character,weaponInfo.Arch:Clone(),player);

        self:Bind2character()
        
        self:AddPrivateComponent(script.Syn2Client)
    end

    self:AddPrivateComponent(script.monitor)
end;




function M.dtor(self)
    -- print("------武器被销毁-----PlayerBow--------->")
	M.super.dtor(self);
end;

return M;
